//---------------------------------------------------------------------
//  This file is part of the Background Motion solution.
// 
//  Copyright (C) Mindscape (TM).  All rights reserved.
//  http://www.mindscape.co.nz
// 
//  THIS CODE AND INFORMATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY
//  KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
//  IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
//  PARTICULAR PURPOSE.
//---------------------------------------------------------------------

using Microsoft.Practices.EnterpriseLibrary.Validation;

using Mindscape.BackgroundMotion.Model;

namespace Mindscape.BackgroundMotion.Website.Views
{
  /// <summary>
  /// A view which allows a contribution to be viewed
  /// </summary>
  public interface IViewView : IView
  {
    /// <summary>
    /// The contribution which has been requested
    /// </summary>
    Contribution Contribution { get; set; }

    /// <summary>
    /// The preview block to be rendered on the view
    /// </summary>
    string Preview { get; set; }

    /// <summary>
    /// The current rating of the download experience for this contribution
    /// </summary>
    Contribution.RatingValue ContributionDownloadRating { set; }

    /// <summary>
    /// The current rating for the contribution
    /// </summary>
    Contribution.RatingValue ContributionRating { set; }

    /// <summary>
    /// Indicates if we can add comments to this contribution
    /// </summary>
    bool CanAddComments { set; }

    /// <summary>
    /// Indicates if we can rate this contribution
    /// </summary>
    bool CanRate { set; }

    /// <summary>
    /// Indicates if we can delete this contribution
    /// </summary>
    bool CanDelete { set; }

    /// <summary>
    /// Indicates if we can approve this contribution
    /// </summary>
    bool CanApprove { set; }

    /// <summary>
    /// A list of validation results to be shown in error if there are data entry errors on the contribution
    /// </summary>
    ValidationResults ValidationResults { set; }
    
    /// <summary>
    /// Removes the last comment from the contribution
    /// </summary>
    void ClearLastComment();

    void EnableSilverlightScriptRendering(bool fromStreamingServer);
  }
}